﻿using Rhino;
using Rhino.Commands;
using System;
using YangTools.Realization;

namespace YangTools
{
    public class ToolbarSaveCommand : Command
    {
        static ToolbarSaveCommand _instance;
        public ToolbarSaveCommand()
        {
            _instance = this;
        }

        ///<summary>The only instance of the YangToolsLoadToolbar command.</summary>
        public static ToolbarSaveCommand Instance
        {
            get { return _instance; }
        }

        public override string EnglishName
        {
            get { return "YangToolsSaveToolbar"; }
        }

        protected override Result RunCommand(RhinoDoc doc, RunMode mode)
        {
            var tool = new Toolbar();
            tool.Save();
            
            return Result.Success;
        }
    }
}